<!-- Content -->
<div class="main_content_wrapper" xmlns="http://www.w3.org/1999/html">
    <div class="left_column">
        <p class="blue_header">
            <?=isset($leftBlock['name'])?$leftBlock['name']:''?>
        </p>

        <p class="full_text">
            <?=isset($leftBlock['text1'])?$leftBlock['text1']:''?>
        </p>
    </div>
    <div class="center_column">
        <div id="slides">
            <div class="slides_container">
<!--                <div class="slider">-->
<!--                    <ul>-->
<!--                        --><?//
//                        if(isset($centerImages)&&$centerImages<>''){
//                            foreach($centerImages as $centerImage){
//        //                        echo'<a target="_blank" href="'.$centerImage['text1'].'"><img src="/content/directory/images/'.$centerImage['section'].'/scrollindex/'.substr($centerImage['alias'],0,1).'/'.$centerImage['alias'].'.jpg" width="570" height="371"></a>';
//                                echo'<li><img src="/content/directory/images/'.$centerImage['section'].'/scrollindex/'.substr($centerImage['alias'],0,1).'/'.$centerImage['alias'].'.jpg" width="570" height="371"></li>';
//                            }
//                        }
//                        ?>
<!--                    </ul>-->
<!--                </div>-->
<!--                <div class="slider_nav">-->
<!--                    <button data-dir="prev">Prev</button>-->
<!--                    <button data-dir="next">Next</button>-->
<!--                </div>-->

                        <?
                        if(isset($centerImages)&&$centerImages<>''){
                            foreach($centerImages as $centerImage){
                                echo'<img src="/content/directory/images/'.$centerImage['section'].'/scrollindex/'.substr($centerImage['alias'],0,1).'/'.$centerImage['alias'].'.jpg" width="570" height="371">';
                            }
                        }
                        ?>

                </div>

        </div>
    </div>
    <div class="clear"></div>
</div>

<div class="bottom_wrapper">
    <div class="bottom_left">
        <div class="gift_wrapper">
            <div class="gift_header">Gift Certificates</div>
            <?php if(!empty($giftcards)) : ?>
                <?php foreach($giftcards as $giftcard) : ?>
                    <div class="gift_item"><a href="<?=$giftcard['text1']?>" target="_blank"> <img src="<?=Model_Directory::imageUrl($giftcard,'giftcard');?>"/></a></div>
                <?php endforeach; ?>
            <?php endif ?>
            <div class="clear"></div>
        </div>

        <div class="testimonials_wrapper">
            <div class="testimonials_top">
                <div class="testimonials_header">
                    Testimonials
                </div>
                <div class="testimonials_controls">
                    <span class="testimonials_control testimonials_left"></span>
                    <span class="testimonials_control testimonials_right"></span>
                </div>
            </div>

<!--            <div class="testimonials_main">-->
<!--                <div class="testimonials_quotes"></div>-->
<!--                <ul id="carousel" class="jcarousel-skin-tango testimonials_text">-->
<!--                    --><?//
//                        if(isset($testimonials)&&$testimonials<>''){
//                            $itemCount=1;
//                            foreach($testimonials as $testimonial){
//                                echo'<li class="jcarousel-item-'.$itemCount.'">
//                                        <div class="testimonials_text">'.$testimonial['text1'].'</div>
//                                        <div class="clear"></div>
//                                        <div class="testimonials_author">'.$testimonial['name'].'</div>
//                                    </li>';
//                             $itemCount++;
//                            }
//                        }
//                    ?>
<!---->
<!--                </ul>-->
<!---->
<!--            </div>-->

            <!--test for carousel lite-->
            <div class="testimonials_quotes"></div>

            <div class="testimonials_main">
                <ul id="carousel">
                    <? if(isset($testimonials) && $testimonials<>'') : ?>

                        <? foreach($testimonials as $testimonial) : ?>
                            <li>
                                <div class="testimonials_text"><?=$testimonial['text1']?></div>
                                <div class="clear"></div>
                                <div class="testimonials_author"><?=$testimonial['name']?></div>
                            </li>
                        <? endforeach ?>

                    <? endif ?>

                </ul>
            </div>
        </div>


    </div>
    <div class="bottom_right">
        <div class="request_form_wrapper">
            <div class="req_top_blue">
                <p>Quick Request Form</p>
            </div>
            <div class="req_main">
                <form action="/" name="quick_request">
                    <p><input type="text" placeholder="Name" name="name"></p>
                    <p><input type="text" placeholder="Email" name="email"></p>
                    <p><input type="text" placeholder="Phone" name="phone"></p>
                    <p><textarea placeholder="Message" name="message"></textarea></p>
                    <p class="form_buttons">
                        <input class="reset_btn" type="button" value="Reset">
                        <input type="submit" value="Submit">
                    </p>
                    <p class="clear"></p>
                </form>

            </div>
            <div class="req_bottom_blue"></div>
        </div>
    </div>
</div>

<!-- End content -->
<script type="text/javascript">
    /*Placeholder plugin*/
    jQuery('input[placeholder], textarea[placeholder]').placeholder();
    $('.reset_btn').live('click',function(){
        $('.req_main input[type=text],textarea').val('').trigger('focus').blur();  //IE reset button hack for placeholder
    });
    $('input[type=submit]').live('click',function(e){
        e.preventDefault();
    });

    $('.header ul li a').last().css('margin-right','0');

    //quick request AJAX
    $(function(){
        $('.req_main input[type=submit]').bind('click',function(){

            var self = $(this),
                form = self.parent().parent(),
                name = form.find('input[name=name]').val(),
                email = form.find('input[name=email]').val(),
                phone = form.find('input[name=phone]').val(),
                message = form.find('textarea').val();


            $.ajax({
                type    : 'POST',
                url     : '/contact/request/',
                dataType: 'json',
                data    : {name:name,email:email,phone:phone,message:message},
                success : function(data){
                    if(data.success){
                        alert(data.success);
                        clearValues(form);
                    }
                    else{
                        alert(data.errors);
                    }
                },
                error   : function(){
                    alert('An error has been occured!Please try again later');
                },
                complete : function(){
//                    loader(form,'hide');
                }

            })

            function clearValues(form){
                $(form).find('input[type=text],textarea').val('');
                return;
            }
        });
    });



</script>

<? if(!empty($testimonials) && $testimonials<>'') : ?>

<script type="text/javascript">
    //jcarousel-lite fire
    (function($) {
        $(".testimonials_main").jCarouselLite({
            btnNext: ".testimonials_right",
            btnPrev: ".testimonials_left",
            visible: 1,
            auto: 5000,
            speed: 600,
            easing: "easeInOutBack",
            hoverPause:true
        });
    })(jQuery);
</script>

<? endif; ?>

<!--<script type="text/javascript" src="/scripts/slider_john.js">-->
<!--    -->
<!--</script>-->